Derive from the AbstractProfiler to implement your own profiler.
More...
#include <kanzi/core/profiling/abstract_profiler.hpp>
|
| AbstractProfiler (string_view name, const ProfilingCategory &category) |
| Constructor. More...
|
|
virtual size_t | getAggregateDataFieldCountOverride () const =0 |
| To provide the number of the aggregate data fields, override this function in the derived profiler class. More...
|
|
virtual string | getAggregateDataFieldNameOverride (size_t fieldIndex) const =0 |
| To provide the name of aggregate data field with given index, override this function in the derived profiler class. More...
|
|
virtual Value | getAggregateDataFieldValueOverride (size_t fieldName) const =0 |
| To provide access to aggregate profiling data field values, override this function in the derived profiler class. More...
|
|
virtual size_t | getSampleFieldCountOverride () const =0 |
| To provide the number of sample fields, override this function in the derived profiler class. More...
|
|
virtual string | getSampleFieldNameOverride (size_t fieldIndex) const =0 |
| To provide the name of a sample field with a given index, override this function in the derived profiler class. More...
|
|
virtual Value | getSampleFieldValueOverride (size_t sampleIndex, size_t fieldName) const =0 |
| To provide access to profiling data sample fields of the derived profiler, override this function in the derived profiler class. More...
|
|
virtual size_t | getSampleCountOverride () const =0 |
| To provide the number of profiling data samples stored in the derived profiler, override this function in the derived profiler class. More...
|
|
virtual void | logAggregateDataOverride () const |
| To implement your own logging of aggregate profiling data, override this function in the derived profiler class. More...
|
|
virtual void | logAllDataOverride () const |
| To implement your own logging of all profiling data, override this function in the derived profiler class. More...
|
|
Derive from the AbstractProfiler to implement your own profiler.
Container for profiling data field value.
Supported profiling data field value types.
Enumerator |
---|
DataTypeNotDefined |
Undefined data type.
|
DataTypeBoolean |
Boolean.
|
DataTypeUint64 |
Unsigned 64 bit integer.
|
DataTypeFloat |
Float.
|
DataTypeString |
String.
|
virtual kanzi::AbstractProfiler::~AbstractProfiler |
( |
| ) |
|
|
virtual |
kanzi::AbstractProfiler::AbstractProfiler |
( |
string_view |
name, |
|
|
const ProfilingCategory & |
category |
|
) |
| |
|
explicitprotected |
Constructor.
- Parameters
-
name | The name of the profiler. |
category | The profiling category assigned to the profiler. |
string_view kanzi::AbstractProfiler::getName |
( |
| ) |
const |
Gets the name of the profiler.
- Returns
- The name of the profiler.
Gets a reference to the profiling category assigned to the profiler.
- Returns
- The profiling category assigned to the profiler.
size_t kanzi::AbstractProfiler::getAggregateDataFieldCount |
( |
| ) |
const |
string kanzi::AbstractProfiler::getAggregateDataFieldName |
( |
size_t |
fieldIndex | ) |
const |
Gets the name of an aggregate data field.
Calls getAggregateDataFieldNameOverride() overriden in the derived profiler class.
- Parameters
-
fieldIndex | The index of the field. |
- Returns
- The name of the aggregate data field.
Value kanzi::AbstractProfiler::getAggregateDataFieldValue |
( |
size_t |
fieldIndex | ) |
const |
Gets the value of an aggregate profiling data field.
Calls getAggregateDataFieldValueOverride() overriden in the derived profiler class.
- Parameters
-
fieldIndex | The index of the aggregate profiling data field. |
- Returns
- The value of the aggregate profiling data field.
size_t kanzi::AbstractProfiler::getSampleFieldCount |
( |
| ) |
const |
Gets the number of sample data fields.
Calls getSampleFieldCountOverride() overriden in the derived profiler class.
- Returns
- The number of sample data fields.
string kanzi::AbstractProfiler::getSampleFieldName |
( |
size_t |
fieldIndex | ) |
const |
Gets the name of a data sample field.
Calls getSampleFieldNameOverride() overriden in the derived profiler class.
- Parameters
-
fieldIndex | The index of the sample field. |
- Returns
- The name of the sample field.
size_t kanzi::AbstractProfiler::getSampleCount |
( |
| ) |
const |
Gets the number of collected profiling data samples.
Calls getSampleCountOverride() overriden in the derived profiler class.
- Returns
- The number of collected profiling data samples.
Value kanzi::AbstractProfiler::getSampleFieldValue |
( |
size_t |
sampleIndex, |
|
|
size_t |
fieldIndex |
|
) |
| const |
Gets the value of a profiling data sample field.
Calls getSampleFieldValueOverride() overriden in the derived profiler class.
- Parameters
-
sampleIndex | The index of the profiling data sample. |
fieldIndex | The index of the field of the profiling data sample. |
- Returns
- The value of the profiling data sample field.
static DataType kanzi::AbstractProfiler::getDataType |
( |
const Value & |
value | ) |
|
|
static |
Gets the type of the data stored in a profiling data field.
- Parameters
-
value | Profiling data field value. |
- Returns
- Type of the data stored in profiling data field.
void kanzi::AbstractProfiler::logAggregateData |
( |
| ) |
const |
|
inline |
Logs aggregate profiling data.
void kanzi::AbstractProfiler::logAllData |
( |
| ) |
const |
|
inline |
virtual size_t kanzi::AbstractProfiler::getAggregateDataFieldCountOverride |
( |
| ) |
const |
|
protectedpure virtual |
virtual string kanzi::AbstractProfiler::getAggregateDataFieldNameOverride |
( |
size_t |
fieldIndex | ) |
const |
|
protectedpure virtual |
To provide the name of aggregate data field with given index, override this function in the derived profiler class.
- Parameters
-
fieldIndex | The index of the field. |
- Returns
- The name of the aggregate data field.
Implemented in kanzi::IntervalProfiler, and kanzi::MainLoopTaskProfiler.
virtual Value kanzi::AbstractProfiler::getAggregateDataFieldValueOverride |
( |
size_t |
fieldName | ) |
const |
|
protectedpure virtual |
To provide access to aggregate profiling data field values, override this function in the derived profiler class.
- Parameters
-
fieldIndex | The index of the aggregate profiling data field. |
- Returns
- The value of the aggregate profiling data field.
Implemented in kanzi::IntervalProfiler, and kanzi::MainLoopTaskProfiler.
virtual size_t kanzi::AbstractProfiler::getSampleFieldCountOverride |
( |
| ) |
const |
|
protectedpure virtual |
virtual string kanzi::AbstractProfiler::getSampleFieldNameOverride |
( |
size_t |
fieldIndex | ) |
const |
|
protectedpure virtual |
To provide the name of a sample field with a given index, override this function in the derived profiler class.
- Parameters
-
fieldIndex | The index of the field. |
- Returns
- The name of sample field.
Implemented in kanzi::IntervalProfiler, and kanzi::MainLoopTaskProfiler.
virtual Value kanzi::AbstractProfiler::getSampleFieldValueOverride |
( |
size_t |
sampleIndex, |
|
|
size_t |
fieldName |
|
) |
| const |
|
protectedpure virtual |
To provide access to profiling data sample fields of the derived profiler, override this function in the derived profiler class.
- Parameters
-
sampleIndex | The index of the profiling data sample. |
fieldIndex | The index of the field of the profiling data sample. |
- Returns
- The value of the profiling data sample field.
Implemented in kanzi::IntervalProfiler, and kanzi::MainLoopTaskProfiler.
virtual size_t kanzi::AbstractProfiler::getSampleCountOverride |
( |
| ) |
const |
|
protectedpure virtual |
virtual void kanzi::AbstractProfiler::logAggregateDataOverride |
( |
| ) |
const |
|
protectedvirtual |
To implement your own logging of aggregate profiling data, override this function in the derived profiler class.
virtual void kanzi::AbstractProfiler::logAllDataOverride |
( |
| ) |
const |
|
protectedvirtual |
To implement your own logging of all profiling data, override this function in the derived profiler class.
The documentation for this class was generated from the following file: